package com.gonsin.ta.example.nodes.nodeComponents;

import com.gonsin.base.exceptions.MyException;
import com.gonsin.ta.example.services.RealLogicService;
import com.gonsin.ta.logic.annotations.NodeComponent;
import com.gonsin.ta.logic.components.RunNode;
import com.gonsin.ta.logic.parse.condition.context.ChainContext;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

@Slf4j
@NodeComponent(nodeId = "保存预约信息")
public class SaveCommitInfo implements RunNode {

    @Autowired private RealLogicService realLogicService;

    @Override
    public void processRun(ChainContext context) {
        realLogicService.sampleMethod();
//        throw new MyException(11, "2222");
    }
}
